{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans "Contact me" %}{% endblock %}

{# You may want to add the URL of this page to your robots.txt, as it contains nothing worth indexing #}
{# Alternatively, the block below will do the same thing #}
{% block meta %}
<meta name="robots" content="noindex" />
{% endblock %}

{% block content %}

{% block content-top %}{% endblock %}

<h1>{% trans "Contact me" %}</h1>

<p>{% trans "Please fill in the form below to send me an email" %}.</p>

{% block contact-form %}
	{% if form.errors or not captcha_is_valid %}
		<div class="errortitle">{% trans "Please fix the errors highlighted below and re-submit" %}.</div>
	{% endif %}
	
	<form id="contact_recaptcha_form" method="post" action="">
	{% csrf_token %}
	{{ form.as_p }}
	
	{% if not user.is_authenticated %}
		<p>{% trans "Please also type the following 2 words exactly as they appear. This is a security measure to ensure that you are not a spam robot" %}.</p>
		
		{% if not captcha_is_valid %}
		<div class="errorlist">{% trans "You did not type in correctly the two words. Please try again!" %}</div>
		{% endif %}
		
		{% if html_captcha %}
			<div style="height: 150px; width: 500px;">
			<div style="position:absolute;">
			{{ html_captcha }}
			</div>
			</div>
		{% else %}
			{# The following dimensions apply to the no-javascript version which is larger #}
			<div style="width:500px;height:300px;background:green;">
			ReCaptcha widget (dev version)
			</div>
		{% endif %}
	{% endif %}
	
	<p><input id="contact_recaptcha_submit" type="submit" value="{% trans "Send message" %}" /></p>
	</form>
	
	<script type="text/javascript">
	//<![CDATA[
	document.forms[0][0].focus();
	//]]>
	</script>
{% endblock %}

{% endblock %}





